package com.sky.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * 菜品
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("dish")
public class Dish extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;

    // 菜品名称
    private String name;

    // 菜品分类id
    private Long categoryId;

    // 菜品名称
    @TableField(exist = false)
    private String categoryName;

    // 菜品价格
    private BigDecimal price;

    // 图片
    private String image;

    // 描述信息
    private String description;

    // 0 停售 1 起售
    private Integer status;

    // 口味
    @TableField(exist = false)
    private List<DishFlavor> flavors = new ArrayList<>();
}
